/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package recorridosimulado;

import ec.util.MersenneTwisterFast;

/**
 *
 * @author USUARIO
 */
public class RecorridoSimulado {
    public static void main(String[] args) {
        double [] X = {0,10};
        MersenneTwisterFast prng = new MersenneTwisterFast(321654987);
        double xi = (X[0]+ X[1])/2; // xi E X
        
        double f_opt = function(xi);
        double T = 0; // temperatura actual del sistema
        boolean condidionParada = false;
        boolean condidionEquilibrio = false;
        while (!condidionParada) {
            while (!condidionEquilibrio) {
                double u = prng.nextDouble();
                double y = generarY(X,xi);
                double calcular = Math.pow(Math.E, (function(y)- function(xi)/T));
                if (calcular > u) {
                    xi = y;
                }
                
            }
        }
    }

    private static double function(double xi) {
        throw new UnsupportedOperationException("Not yet implemented");
    }

    private static double generarY(double[] X, double xi) {
        throw new UnsupportedOperationException("Not yet implemented");
    }
}
